package edu.avans.hartigehap.domain;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

@Entity
public abstract class WebPizzaDecorator extends WebPizzaBase implements
		Serializable {
	private static final long serialVersionUID = 1L;

	protected WebPizzaBase pizzaBase;

	@OneToOne()
	@JoinColumn(name="DECORATED_WEBDISH_ID",referencedColumnName="WEBDISH_ID", nullable=true)
	public WebPizzaBase getPizzaBase() {
		return pizzaBase;
	}

	public void setPizzaBase(WebPizzaBase pizzaBase) {
		this.pizzaBase = pizzaBase;
	}
	
	public void decorate(WebDish pizzaBase) {
		this.pizzaBase = (WebPizzaBase) pizzaBase;
	}

}
